//
//  ZHIMConversation.h
//  ZHIMCore
//
//  Created by Chen Zhangli on 2021/1/18.
//

#import <Foundation/Foundation.h>
#import "ZHIMMessage.h"
#import "ZHIMTimeRange.h"

NS_ASSUME_NONNULL_BEGIN

@interface ZHIMConversation : NSObject

@property (nonatomic, copy, readonly) NSString *conversationId;
@property (nonatomic, copy) NSString *serverId;

/// 聊天类型
@property (nonatomic, assign) ZHIMChatType chatType;

/// 会话对象id
@property (nonatomic, copy) NSString *receiver;
@property (nonatomic, strong, readonly) id receiverObj;

/// 会话类型
@property (nonatomic, assign) ZHIMConversationType conversationType;

/// 会话对象姓名
@property (nonatomic, copy) NSString *name;

/// 会话对象头像
@property (nonatomic, copy) NSString *avatar;

/// 会话内容
@property (nonatomic, copy) NSString *content;

/// 会话时间
@property (nonatomic, assign) long long timestamp;

/// 消息未读数
@property (nonatomic, assign) long long unreadCount;

/// 会话是否置顶
@property (nonatomic, assign) BOOL isTop;

/// 会话是否免打扰
@property (nonatomic, assign) BOOL isNotDisturb;

/// 群成员数
@property (nonatomic, assign) NSInteger memberCount;

@property (nonatomic, strong) ZHIMMessage *lastMessage;

@property (nonatomic, copy) NSString *csId;

@property (nonatomic, assign, readonly) int64_t version;

/// 消息时间区间
@property (nonatomic, assign, readonly) ZHIMTimeRange timeRange;
@property (nonatomic, assign, readonly) ZHIMDateRange dateRange;

@end

NS_ASSUME_NONNULL_END
